<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../css/element.css" rel="stylesheet"/>
    <link href="../css/styleindex.css" rel="stylesheet"/>
    <style>
      .el-icon-success{
        color: #058142;
      }.el-icon-success,.el-icon-error{
        font-size: 1.4rem;
      }
    </style>
</head>
<body style="background:#EFF0F4;">

  <div class="mui-content">
    <div id="vm" class="x-examok" v-cloak>
      <div class="x-header-g" id="header">
        <a class="x-header-arrow" @click="api.closeWin()"></a>
        <div class="x-header-t">工作站技能</div>
      </div>
      <!--  -->
      <div class="x-pro-list">
        <div class="x-pro-desc" v-for="item in tabledata" :key="item.key">
          <div class="x-pmo-skill">{{item.title}}</div>
          <template>
            <el-table :data="item.list">
              <el-table-column :label="itemk.label" width="" v-for="(itemk,index) in item.header" :key="index" :prop="itemk.property">
                <template slot-scope="scope">
                  <div v-if="scope.row[scope.column.property]==1"><i class="el-icon-success"></i></div>
                  <div v-if="scope.row[scope.column.property]==0"><i class="el-icon-error"></i></div>
                  <div v-if="scope.row[scope.column.property]!=0&&scope.row[scope.column.property]!=1">{{scope.row[scope.column.property]}}</div>

                </template>
              </el-table-column>
            </el-table>
          </template>
        </div>
      </div>
    </div>
  </div>

  <script type="text/javascript" src="../script/vue.js"></script>
  <script type="text/javascript" src="../script/element.js"></script>
  <script type="text/javascript" src="../script/api.js"></script>
  <script type="text/javascript" src="../script/base.js"></script>
	<script>
apiready = function () {
    $api.fixStatusBar($api.byId('header'));


    //
    var vm = new Vue({
      el:'#vm',
      data(){
        return{
          tabledata:[],

        }
      },
      created:function() {
        var that=this;


      },
      mounted:function(){
        var that=this;
        that.getdata()

      },
      methods: {
        //列表
        getdata:function(id){
          let that=this;
          api.ajax({
            url:baseurl+'api/practice/wsSkill',
            methods:'get',
            data:{
              values:{
                sec: $api.getStorage('apptoken'),
                _ssid:$api.getStorage('jobid')
              }
            }
          },function(ret,err){
            if(ret){
              api.hideProgress();
              console.log(JSON.stringify(ret));
              if(ret.status == 1){
                  that.tabledata = ret.data.list;
              }else{
                api.toast({
                    msg: ret.msg,
                    duration: 3000,
                    location: 'bottom'
                });
              }
            }else{
              api.hideProgress();
              console.log(JSON.stringify(err));
              api.toast({
                  msg: err.msg,
                  duration: 3000,
                  location: 'bottom'
              });
            }
          })
        },
      }
    })
	}


	</script>
</body>
</html>
